/*
	Pinkie's Balloon Fight
	Copyright (C) 2012  dancinninja (dancinninjac@gmail.com)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __Pinkie_TexManager__
#define __Pinkie_TexManager__

#include "StdInc.h"
#include <vector>

// Set our texture "object" that we will be returning
#ifdef WIN32
typedef GLuint TexObjPtr;
struct Texture{

	Texture(){}
	~Texture(){
		// Delete texture
		glDeleteTextures(1, &obj);
	}

	TexObjPtr obj; // Texture object
};
#else //Wii
typedef GXTexObj* TexObjPtr 
struct Texture{

	Texture(){data = NULL;}
	~Texture(){
		if(data) 
			free(data);
		data = NULL;
	}

	TexObjPtr obj; // Texture object
	u8* data;      // Actual texture data
};
#endif

class TexManager{

public:
	TexManager();
	~TexManager();

	bool LoadTexture(const char* fileName);
	Texture* GetTexture(s32 index) const;
	s32 GetSize() const;
	void Clear();
	void Reserve(u32 amount);

private:
	std::vector<Texture*> vTexture;
};


#endif
